You are here: Symbol Reference > Dew Namespace > Dew.Math Namespace > Classes > TVec Class > TVec Methods > Resize Method > TVec.Resize Method ([In] TMtxVec, int, bool)
Dew Math for .NET
ContentsIndexHome
PreviousUpNext
TVec.Resize Method ([In] TMtxVec, int, bool)

Resizes vector size while preserving values.

Syntax
C#
Visual Basic
public TVec Resize([In] TMtxVec Src, int Len, bool ZeroIt);

Resizes calling vector Length to Len and fills it with Src vector first Len values. If Src length is less than Len and ZeroIt parameter is true, the remaining calling vector values are set to zero.

var a, b: Tvec; begin CreateIt(a,b); try a.SetIt(false,[1,2,3]); b.SetIt(false,[9]); b.Resize(a,7,True); // b=(9,1,2,3,4,0,0,0) finally FreeIt(a,b); end; end;
Copyright (c) 1999-2024 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!